[#84]: Add v0.133.0 regression tests for TurnContextItem field trimming#88
Merged
Conversation
… trimming Codex v0.133.0 (PR #22709) trimmed unused fields from TurnContextItem session structure. The parser already handled this correctly (all fields extracted via optional .get() chains), and turn.rs already had tests for both pre- and post-v0.133.0 payloads. This commit adds the missing version-specific regression tests to entry.rs and session.rs to document the v0.133.0 change and guard against future regressions: - entry.rs: v0133_turn_context_trimmed_payload_parses_as_turn_context_entry verifies a minimal v0.133.0 turn_context (model only) parses without panic - entry.rs: v0133_all_standard_entry_types_parse_correctly regression guard for all four standard JSONL entry types under v0.133.0 - session.rs: v0133_turn_context_trimmed_fields_session_parses_correctly full session parse with trimmed turn_context verifies model is extracted and missing cwd/effort fields are silently absent Fixes #84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex v0.133.0 (PR #22709) trimmed unused fields from the
TurnContextItemsession structure. Theturn_contextJSONL payload now carries onlymodel; fields likecwdandeffortmay be absent in sessions from v0.133.0+.The parser already handled this correctly — all fields are extracted via optional
.get().and_then()chains inhandle_turn_context, so missing fields silently produceNonewithout panicking.turn.rsalso already had targeted tests for pre- and post-v0.133.0 payloads (turn_context_with_extra_legacy_fields_does_not_panic,turn_context_with_missing_trimmed_fields_does_not_panic).What was missing was a set of version-specific regression tests in
entry.rsandsession.rsto document the v0.133.0 change and provide coverage at the full-session parse level.Changes
src-tauri/src/parser/entry.rsv0133_turn_context_trimmed_payload_parses_as_turn_context_entry— verifies a minimal v0.133.0turn_context(onlymodelpresent) is parsed asturn_contextentry type without panicv0133_all_standard_entry_types_parse_correctly— regression guard ensuring all four standard JSONL entry types (session_meta,event_msg,response_item,turn_context) parse correctly under v0.133.0 with the trimmed payloadsrc-tauri/src/parser/session.rsv0133_turn_context_trimmed_fields_session_parses_correctly— full session parse with a v0.133.0turn_context(onlymodel); verifiesmodelis extracted,reasoning_effortisNone, and the session parses without panicTesting
All 134 Rust tests pass. All 128 frontend tests pass. Clippy and cargo fmt clean.
Fixes #84